package com.softeem.mpdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 专辑表
 * @TableName ablum
 */
@TableName(value ="ablum")
@Data
public class Ablum implements Serializable {
    /**
     * 专辑id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 专辑名
     */
    private String name;

    /**
     * 发行时间
     */
    private Date releasedate;

    /**
     * 唱片公司
     */
    private String company;

    /**
     * 封面图
     */
    private String coverimg;

    /**
     * 语种
     */
    private String language;

    /**
     * 专辑介绍
     */
    private String summary;

    /**
     * 歌手id
     */
    private Integer sid;

    /**
     * 热搜指数0~99999
     */
    private Long hot;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Ablum other = (Ablum) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getReleasedate() == null ? other.getReleasedate() == null : this.getReleasedate().equals(other.getReleasedate()))
            && (this.getCompany() == null ? other.getCompany() == null : this.getCompany().equals(other.getCompany()))
            && (this.getCoverimg() == null ? other.getCoverimg() == null : this.getCoverimg().equals(other.getCoverimg()))
            && (this.getLanguage() == null ? other.getLanguage() == null : this.getLanguage().equals(other.getLanguage()))
            && (this.getSummary() == null ? other.getSummary() == null : this.getSummary().equals(other.getSummary()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getHot() == null ? other.getHot() == null : this.getHot().equals(other.getHot()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getReleasedate() == null) ? 0 : getReleasedate().hashCode());
        result = prime * result + ((getCompany() == null) ? 0 : getCompany().hashCode());
        result = prime * result + ((getCoverimg() == null) ? 0 : getCoverimg().hashCode());
        result = prime * result + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
        result = prime * result + ((getSummary() == null) ? 0 : getSummary().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getHot() == null) ? 0 : getHot().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", releasedate=").append(releasedate);
        sb.append(", company=").append(company);
        sb.append(", coverimg=").append(coverimg);
        sb.append(", language=").append(language);
        sb.append(", summary=").append(summary);
        sb.append(", sid=").append(sid);
        sb.append(", hot=").append(hot);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}